package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println("hello world!")
	fmt.Println("go 语言的换行符号\n\\n.")
	fmt.Println("go 语言的tab符号\t\\t.")
	fmt.Println("go 语言:\"有python的灵活性和c语言的高效性\".")
	fmt.Println("\\r的意思：从当前行顶头开始输出覆盖掉以前的内容")
	fmt.Println("aaa.bbb\rrrr")

	// 换行符号的应用
	fmt.Println("name\tage\taddress\n张三\t25\t西安")
	print_image()
}


func print_image() {
	fmt.Println("\t."+rep("\t",12)+".\t")
	fmt.Println("."+rep("\t",4)+"."+"I love GoLang"+"."+rep("\t",4)+".")
	fmt.Println("\t."+rep("\t",12)+".\t")
	fmt.Println(rep("\t",2)+"."+rep("\t",10)+"."+rep("\t",2))
	fmt.Println(rep("\t",3)+"."+rep("\t",8)+"."+rep("\t",3))
	fmt.Println(rep("\t",4)+"."+rep("\t",6)+"."+rep("\t",4))
	fmt.Println(rep("\t",5)+"."+rep("\t",4)+"."+rep("\t",5))
	fmt.Println(rep("\t",6)+"."+rep("\t",2)+"."+rep("\t",6))
	fmt.Println(rep("\t",7)+"."+"."+rep("\t",7))
}

func rep(inp string,num int) string{
	return strings.Repeat(inp,num)
}